package com.shuoyutech.dp.common.framework.response;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Collection;

/**
 * @author dyb
 * @date 2021/2/25
 */
@Data
@ToString(callSuper = true)
@NoArgsConstructor
public class PageResult<T> extends Result <Collection<T>> {
    private static final long serialVersionUID = 1L;

    private long total;
    private int current;
    private int size;

    PageResult(Collection<T> list, String resultCode, String message, int current, int size, Long total) {
        this.resultCode = resultCode;
        this.message = message;
        this.data = list;
        this.current = current;
        this.size = size;
        this.total = total;
    }

}
